package com.dreamthen.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

import java.util.Date;

/**
 * @Author zengms
 * @Date 2023-11-07 19:37:35
 **/
public class User {

    private String id;

    private String name;

    @JsonFormat(pattern = "yyyy-MM-dd")//日期格式化，给前端展示，注意：传参的格式需要跟当前格式保持一致
    private Date birthday;

//    @JsonIgnore //返回bean文本对象的时候，忽略此字段（不返回）
    private String passWord;//密码,

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public User() {
    }

    public String getPassWord() {
        return passWord;
    }

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    public User(String id, String name, Date birthday, String passWord) {
        this.id = id;
        this.name = name;
        this.birthday = birthday;
        this.passWord = passWord;
    }

    @Override
    public String toString() {
        return "User{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", birthday=" + birthday +
                ", passWord='" + passWord + '\'' +
                '}';
    }
}
